package VN.EDU.IMIC.DEVELOPER.TRINHCAOSANG.Exam01.Bai1;

/**
 * Created by Sang on 07/03/2016.
 */
public class HinhthoiEntity implements IGeometricObject {
    private double canh;
    private double duongCheo1;
    private double  duongCheo2;

    public double getCanh() {
        return canh;
    }

    public void setCanh(double canh) {
        this.canh = canh;
    }

    public double getDuongCheo1() {
        return duongCheo1;
    }

    public void setDuongCheo1(double duongCheo1) {
        this.duongCheo1 = duongCheo1;
    }

    public double getDuongCheo2() {
        return duongCheo2;
    }

    public void setDuongCheo2(double duongCheo2) {
        this.duongCheo2 = duongCheo2;
    }

    @Override
    public double getArea(Object object) {
        return (duongCheo1*duongCheo2) /2;
    }

    @Override
    public double getPerimeter(Object object) {
        return canh * 4;
    }
}
